<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
  <title>DFU-UTIL</title>
  <style type="text/css">
      code{white-space: pre-wrap;}
      span.smallcaps{font-variant: small-caps;}
      span.underline{text-decoration: underline;}
      div.column{display: inline-block; vertical-align: top; width: 50%;}
  </style>
</head>
<body>
<header id="title-block-header">
<h1 class="title">DFU-UTIL</h1>
<p class="date">September 2021</p>
</header>
<h1>NAME</h1>
<p>dfu-util - Device firmware update (DFU) USB programmer</p>
<h1>SYNOPSIS</h1>
<p><strong>dfu-util</strong> <strong>-l</strong> [ <strong>-v</strong> ] [ <strong>-d</strong> <em>vid:pid</em>[ ,<em>vid:pid</em> ] ] [ <strong>-p</strong> <em>path</em> ] [ <strong>-c</strong> <em>configuration</em> ] [ <strong>-i</strong> <em>interface</em> ] [ <strong>-a</strong> <em>alt-intf</em> ] [ <strong>-S</strong> <em>serial</em>[ ,<em>serial</em> ] ]</p>
<p><strong>dfu-util</strong> [ <strong>-v</strong> ] [ <strong>-d</strong> <em>vid:pid</em>[ ,<em>vid:pid</em> ] ] [ <strong>-p</strong> <em>path</em> ] [ <strong>-c</strong> <em>configuration</em> ] [ <strong>-i</strong> <em>interface</em> ] [ <strong>-a</strong> <em>alt-intf</em> ] [ <strong>-S</strong> <em>serial</em>[ ,<em>serial</em> ] ] [ <strong>-t</strong> <em>size</em> ] [ <strong>-Z</strong> <em>size</em> ] [ <strong>-w</strong> ] [ <strong>-s</strong> <em>address</em> ] [ <strong>-R</strong> ] [ <strong>-D</strong> | <strong>-U</strong> <em>file</em> ]</p>
<p><strong>dfu-util</strong> [ <strong>-hV</strong> ]</p>
<h1>DESCRIPTION</h1>
<p><strong>dfu-util</strong> is a program that implements the host (computer) side of the USB DFU (Universal Serial Bus Device Firmware Upgrade) protocol.</p>
<p>dfu-util communicates with devices that implement the device side of the USB DFU protocol, and is often used to upgrade the firmware of such devices.</p>
<h1>OPTIONS</h1>
<dl>
<dt><strong>-l, --list</strong></dt>
<dd><p>List the currently attached DFU capable USB devices.</p>
</dd>
<dt><strong>-d, --device</strong> [<em>Run-Time VENDOR</em>]:[<em>Run-Time PRODUCT</em>][,[<em>DFU Mode VENDOR</em>]:[<em>DFU Mode PRODUCT</em>]]</dt>
<dd><p>Specify run-time and/or DFU mode vendor and/or product IDs of the DFU device to work with. <strong>VENDOR</strong> and <strong>PRODUCT</strong> are hexadecimal numbers (no prefix needed), "*" (match any), or "-" (match nothing). By default, any DFU capable device in either run-time or DFU mode will be considered.</p>
<p>If you only have one standards-compliant DFU device attached to your computer, this parameter is optional. However, as soon as you have multiple DFU devices connected, dfu-util will detect this and abort, asking you to specify which device to use.</p>
<p>If only run-time IDs are specified (e.g. "<strong>--device 1457:51ab</strong>"), then in addition to the specified run-time IDs, any DFU mode devices will also be considered. This is beneficial to allow a DFU capable device to be found again after a switch to DFU mode, since the vendor and/or product ID of a device usually changes in DFU mode.</p>
<p>If only DFU mode IDs are specified (e.g. "<strong>--device ,951:26</strong>"), then all run-time devices will be ignored, making it easy to target a specific device in DFU mode.</p>
<p>If both run-time and DFU mode IDs are specified (e.g. "<strong>--device</strong> 1457:51ab,:2bc"), then unspecified DFU mode components will use the run-time value specified.</p>
<p>Examples:</p>
<dl>
<dt><strong>--device 1457:51ab,951:26</strong></dt>
<dd><p><br />
Work with a device in run-time mode with vendor ID 0x1457 and product ID 0x51ab, or in DFU mode with vendor ID 0x0951 and product ID 0x0026</p>
</dd>
</dl>
<dl>
<dt><strong>--device 1457:51ab,:2bc</strong></dt>
<dd><p><br />
Work with a device in run-time mode with vendor ID 0x1457 and product ID 0x51ab, or in DFU mode with vendor ID 0x1457 and product ID 0x02bc</p>
</dd>
</dl>
<dl>
<dt><strong>--device 1457:51ab</strong></dt>
<dd><p><br />
Work with a device in run-time mode with vendor ID 0x1457 and product ID 0x51ab, or in DFU mode with any vendor and product ID</p>
</dd>
</dl>
<dl>
<dt><strong>--device ,951:26</strong></dt>
<dd><p><br />
Work with a device in DFU mode with vendor ID 0x0951 and product ID 0x0026</p>
</dd>
</dl>
<dl>
<dt><strong>--device *,-</strong></dt>
<dd><p><br />
Work with any device in run-time mode, and ignore any device in DFU mode</p>
</dd>
</dl>
<dl>
<dt><strong>--device ,</strong></dt>
<dd><p><br />
Ignore any device in run-time mode, and Work with any device in DFU mode</p>
</dd>
</dl>
</dd>
<dt><strong>-p, --path</strong> BUS-PORT. ... .PORT</dt>
<dd><p>Specify the path to the DFU device.</p>
</dd>
<dt><strong>-c, --cfg</strong> CONFIG-NR</dt>
<dd><p>Specify the configuration of the DFU device. Note that this is only used for matching, the configuration is not set by dfu-util.</p>
</dd>
<dt><strong>-i, --intf</strong> INTF-NR</dt>
<dd><p>Specify the DFU interface number.</p>
</dd>
<dt><strong>-a, --alt</strong> ALT</dt>
<dd><p>Specify the altsetting of the DFU interface by name or by number.</p>
</dd>
<dt><strong>-S, --serial</strong> [<em>Run-Time SERIAL</em>][,[<em>DFU Mode SERIAL</em>]]</dt>
<dd><p>Specify the run-time and DFU mode serial numbers used to further restrict device matches. If multiple, identical DFU devices are simultaneously connected to a system then vendor and product ID will be insufficient for targeting a single device. In this situation, it may be possible to use this parameter to specify a serial number which also must match.</p>
<p>If only a single serial number is specified, then the same serial number is used in both run-time and DFU mode. An empty serial number will match any serial number in the corresponding mode.</p>
</dd>
<dt><strong>-t, --transfer-size</strong> SIZE</dt>
<dd><p>Specify the number of bytes per USB transfer. The optimal value is usually determined automatically so this option is rarely useful. If you need to use this option for a device, please report it as a bug.</p>
</dd>
<dt><strong>-Z, --upload-size</strong> SIZE</dt>
<dd><p>Specify the expected upload size, in bytes. Note that the value is only used for scaling the progress bar, the actual upload size is determined by the device.</p>
</dd>
<dt><strong>-U, --upload</strong> FILE</dt>
<dd><p>Read firmware from device into <strong>FILE</strong>.</p>
</dd>
<dt><strong>-D, --download</strong> FILE</dt>
<dd><p>Write firmware from <strong>FILE</strong> into device. When <strong>FILE</strong> is -, the firmware is read from stdin.</p>
</dd>
<dt><strong>-R, --reset</strong></dt>
<dd><p>Issue USB reset signalling after upload or download has finished.</p>
</dd>
<dt><strong>-e, --detach</strong></dt>
<dd><p>Request that the device re-enumerate out of run-time mode and into DFU mode as when uploading or downloading, but exit immediately after sending the request.</p>
</dd>
<dt><strong>-E, --detach-delay</strong> SECONDS</dt>
<dd><p>When uploading or downloading, wait <strong>SECONDS</strong> seconds for the device to re-enumerate after sending the detach request before giving up. Defaults to 5 seconds. This option has no effect with <strong>-e</strong>, since that causes dfu-util to immediately exit after sending the detach request.</p>
</dd>
<dt><strong>-w, --wait</strong></dt>
<dd><p>Wait until matching device appears on the USB bus.</p>
</dd>
<dt><strong>-s, --dfuse-address</strong> [<em>ADDRESS</em>][:<em>LENGTH</em>][:<em>MODIFIERS</em>]</dt>
<dd><p>Specify target address for raw binary download/upload on DfuSe devices. Do <strong>not</strong> use this option for downloading DfuSe (.dfu) files. A length can be specified for uploads. Modifiers can be added after the address, separated by a colon, to perform special DfuSE commands such as "leave" DFU mode, "unprotect" and "mass-erase" flash memory. If the device can be expected to reset itself after the operation, "will-reset" should be added. The "force" modifier will override some sanity checks, and is also needed for the "unprotect" and "mass-erase" operations.</p>
</dd>
<dt><strong>-v, --verbose</strong></dt>
<dd><p>Print more information about dfu-util's operation. A second <strong>-v</strong> adds more details. A third <strong>-v</strong> activates verbose logging of USB requests (libusb debug output).</p>
</dd>
<dt><strong>-h, --help</strong></dt>
<dd><p>Show a help text and exit.</p>
</dd>
<dt><strong>-V, --version</strong></dt>
<dd><p>Show version information and exit.</p>
</dd>
</dl>
<h1>EXAMPLES</h1>
<h2>Using dfu-util in the OpenMoko project</h2>
<p>(with the Neo1973 hardware)</p>
<p>Flashing the rootfs:<br />
<strong> $ dfu-util -a rootfs -R -D /path/to/openmoko-devel-image.jffs2</strong></p>
<p>Flashing the kernel:<br />
<strong> $ dfu-util -a kernel -R -D /path/to/uImage</strong></p>
<p>Flashing the bootloader:<br />
<strong> $ dfu-util -a u-boot -R -D /path/to/u-boot.bin</strong></p>
<p>Copying a kernel into RAM:<br />
<strong> $ dfu-util -a 0 -R -D /path/to/uImage</strong></p>
<p>Once this has finished, the kernel will be available at the default load address of 0x32000000 in Neo1973 RAM. <strong>Note:</strong> You cannot transfer more than 2MB of data into RAM using this method.</p>
<h2>Using dfu-util with a DfuSe device</h2>
<p>Flashing a <strong>.dfu</strong> (special DfuSe format) file to the device:<br />
<strong> $ dfu-util -D /path/to/dfuse-image.dfu</strong></p>
<p>Reading out 1 KB of flash starting at address 0x8000000:<br />
<strong> $ dfu-util -a 0 -s 0x08000000:1024 -U newfile.bin</strong></p>
<p>Flashing a binary file to address 0x8004000 of device memory and ask the device to leave DFU mode:<br />
<strong> $ dfu-util -a 0 -s 0x08004000:leave -D /path/to/image.bin</strong></p>
<h1>BUGS</h1>
<p>Please report any bugs to the dfu-util bug tracker at <strong>http://sourceforge.net/p/dfu-util/tickets/</strong>. Please use the <em>--verbose</em> option (repeated as necessary) to provide more information in your bug report.</p>
<h1>SEE ALSO</h1>
<p>The dfu-util home page is <strong>http://dfu-util.sourceforge.net/</strong></p>
<h1>HISTORY</h1>
<p>dfu-util was originally written for the OpenMoko project by Weston Schmidt &lt;weston_schmidt@yahoo.com&gt; and Harald Welte &lt;hwelte@hmw-consulting.de&gt;. Over time, nearly complete support of DFU 1.0, DFU 1.1 and DfuSe ("1.1a") has been added.</p>
<h1>LICENCE</h1>
<p><strong>dfu-util</strong> is covered by the GNU General Public License (GPL), version 2 or later.</p>
<h1>COPYRIGHT</h1>
<p>This manual page was originally written by Uwe Hermann &lt;uwe@hermann-uwe.de&gt;, and is now part of the dfu-util project.</p>
</body>
</html>
